package com.atguigu.bigdata.spark.core.rdd.operator.transform

import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

/**
  * create by undeRdoG on  2021-06-08  13:06
  * 凡心所向，素履以往，生如逆旅，一苇以航。
  */
object Spark04_RDD_Operator_Transform {

  def main(args: Array[String]): Unit = {
    val sparkConf = new SparkConf().setAppName("Operator").setMaster("local[*]")
    val sc = new SparkContext(sparkConf)


    val rdd: RDD[List[Int]] = sc.makeRDD(List(List(1,2),List(3,4)))

    val value: RDD[Int] = rdd.flatMap(
      x => {
        x
      }
    )
    value
    sc.stop()
  }
}
